Overview
These Python scripts demonstrate conversion from ISIS3 cubes to PDS4 format using GDAL’s PDS4 driver. They read ISIS3 label metadata and generate configuration files forgdal_translate, enabling automated conversions with proper PDS4 metadata.
PDS4 (Planetary Data System version 4) is NASA’s current standard for archiving planetary science data. These tools bridge ISIS3 and PDS4 workflows.
Available Scripts
isis3_to_pds4_LOLA_pvl.py
Uses the PVL library to parse ISIS3 labels.isis3_to_pds4_LOLA_pysis.py
Uses the pysis library to read ISIS3 labels via ISIS commands.Both scripts produce identical output but use different methods for reading ISIS3 metadata. Choose based on your environment and installed dependencies.
Installation
Requirements
For pvl version:Usage
isis3_to_pds4_LOLA_pvl.py
Parameters
Input ISIS3 cube file.
Output configuration file for
gdal_translate.Automatically execute
gdal_translate after generating config.Path to custom PDS4 XML template. Defaults to
$GDALDATA/pds4_template.xml.Example Workflow
Automated Conversion
Use the-run flag to execute conversion automatically:
Custom Template
Provide a custom PDS4 XML template:PDS4 Template Variables
The scripts extract ISIS3 metadata and map it to PDS4 template variables:| Variable | ISIS3 Source | Description |
|---|---|---|
VAR_TARGET | Mapping/TargetName | Target body name (e.g., MOON, MARS) |
VAR_TARGET_TYPE | Hardcoded | Set to “Satellite” |
VAR_INVESTIGATION_AREA_NAME | Archive/InstrumentHostName | Mission name (e.g., “LUNAR RECONNAISSANCE ORBITER”) |
VAR_LOGICAL_IDENTIFIER | Archive/DataSetId | Dataset identifier (e.g., “LRO-L-LOLA-4-GDR-V1.0”) |
VAR_OBSERVING_SYSTEM_NAME | Archive/InstrumentId | Instrument name (e.g., “LOLA”) |
VAR_TITLE | Archive/ProductId | Product title |
VAR_INVESTIGATION_AREA_LID_REFERENCE | Hardcoded | Context URN for mission |
PDS4 Format Details
What is PDS4?
PDS4 is the fourth major version of NASA’s Planetary Data System standard, featuring:- XML Labels: Structured, validated metadata in XML format
- Multiple Data Formats: Supports FITS, GeoTIFF, raw binary, and more
- Context Products: Links to missions, instruments, targets, and investigators
- Schema Validation: Ensures compliance with PDS4 standards
GDAL PDS4 Driver
The GDAL PDS4 driver supports:- Reading and writing PDS4 products
- GeoTIFF-embedded image data (
IMAGE_FORMAT=GEOTIFF) - Custom XML templates with variable substitution
- Spatial reference system preservation
For complete GDAL PDS4 driver documentation, see: http://www.gdal.org/frmt_pds4.html
Test Data
Example test data included in the repository:Configuration File Format
The generated.config files contain gdal_translate options:
gdal_translate --optfile config.txt to avoid lengthy command lines.
Customization
Modifying Extracted Metadata
Edit the Python scripts to extract additional ISIS3 metadata:Custom PDS4 Templates
Create custom XML templates with placeholder variables:${VAR_*} with values from -co options.
Script Locations
Troubleshooting
GDAL Version Issues
Missing ISIS3 Metadata
If required fields are missing from ISIS3 labels, edit the config file manually:Template Not Found
SetGDAL_DATA environment variable:
Related Resources
These scripts serve as examples. Adapt them for your specific mission data and PDS4 requirements.